import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询公共参数
 * @param {*} query
 * @returns
 */
export function queryData(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/findM',
    method: 'get',
    params: query
  })
}

// 获取新增时候的编码
export function getAutoCodeM() {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/autoCodeM',
    method: 'get',
  })
}



// 查询平均曲线类型
export function findcvtype() {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvtype',
    method: 'get',
  })
}

//查询平均曲线编号
export function findcvlist(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/findcvlist',
    method: 'get',
    params: query
  })
}

/**
 * 增加参数值
 * @param {*} data
 * @returns
 */

export function addCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/addM',
    method: 'post',
    data
  })
}

//
/**
 * 增加参数值 ----！！！
 * @param {*} data
 * @returns
 */

export function synchronizationGenerate(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/movingverage/generate',
    method: 'get',
    params: query
  })
}

/**
 * 单条删除
 * @param {*} query
 * @returns
 */
export function  aSingleDelete(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/delM',
    method: 'get',
    params: query
  })
}


/**
 * 修改参数
 * @param {*} data
 * @returns
 */
export function modifyParameters(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/updateM',
    method: 'post',
    data
  })
}

/**
 * 同步
 * @param {*} data
 * @returns
 */
export function CurveOverlaygenerate(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/CurveOverlay/CurveOverlaygenerate',
    method: 'get',
    params: query
  })
}
